package net.maku.project.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import net.maku.framework.common.utils.PageResult;
import net.maku.framework.common.utils.Result;
import net.maku.project.query.StepDetailQuery;
import net.maku.project.service.StepDetailService;
import net.maku.project.vo.StepDetailVO;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * (maku-boot.step_detail)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/step_detail")
@Tag(name = "环节日志表")
@AllArgsConstructor
public class StepDetailController {
    private final StepDetailService StepDetailService;

    @GetMapping("page")
//    @Operation(summary = "分页")
//    @PreAuthorize("hasAuthority('project:project-step-detail:page')")
    public Result<PageResult<StepDetailVO>> page(@ParameterObject @Valid StepDetailQuery query) {
        PageResult<StepDetailVO> page = StepDetailService.page(query);
        return Result.ok(page);
    }
}
